// 
import {request, uploadFile} from './bks.request'

// 名片三方登陆
export const tripartitLogin = (data) => {
  return request({
    url: '/oauth/tripartite/login',
    method: 'post',
	header: {
		client_id: 'app',
		client_secret: '123456'
	},
    data
  })
}
// 名片三方登陆
export const tripartitLoginNew = (data) => {
  return request({
    url: '/oauth/tripartite/login/new',
    method: 'post',
	header: {
		client_id: 'app',
		client_secret: '123456'
	},
    data
  })
}
// 收藏
export const collectAdd = (data) => {
  return request({
    url: '/applet/collect',
    method: 'post',
    data
  })
}
// 取消收藏
export const collectDel = (params) => {
  return request({
    url: '/applet/collect',
    method: 'delete',
    header: { 'Content-Type': 'application/x-www-form-urlencoded' },
    params
  })
}
// 学校简介
export const schoolDetail = (params) => {
  return request({
    url: '/applet/applet-anon/school/profile',
    params
  })
}
// 专业大类
export const majorBig = (params) => {
  return request({
    url: '/applet/applet-anon/school/major/big',
    params
  })
}
// 专业大类
export const majorSmall = (params) => {
  return request({
    url: '/applet/applet-anon/school/major/small',
    params
  })
}
// 招生计划年份下拉框
export const planYearSelect = (params) => {
  return request({
    url: '/applet/applet-anon/school/plan/year',
    params
  })
}
// 招生计划批次下拉框
export const patchSelect = (params) => {
  return request({
    url: '/applet/applet-anon/school/plan/batch',
    params
  })
}
// 招生计划列表
export const planList = (data) => {
  return request({
    url: '/applet/applet-anon/school/plan/list',
    method: 'post',
    data
  })
}
// 分数线
export const scoreLine = (params) => {
  return request({
    url: '/applet/applet-anon/school/score/line',
    params
  })
}

// 专业详情
export const majorDetail = (params) => {
  return request({
    url: '/applet/applet-anon/school/major/info',
    params
  })
}
// 开设院校
export const schoolOpen = (data) => {
  return request({
    url: '/applet/school/open',
    method: 'post',
    data
  })
}
// 小程序资料详情
export const materialsDetail = (materialsId) => {
  return request({
    url: `/applet/materials/app/${materialsId}`
  })
}
// 获取学校的下拉框
export const shoolSelect = (params) => {
  return request({
    url: `/sys/query/school`,
    params
  })
}
// 获取区县的下拉框
export const districtSelect = (params) => {
  return request({
    url: `/sys/query/district`,
    params
  })
}
// 根据区县id查询旗下的学校列表
export const unitByDis = (params) => {
  return request({
    url: `/sys/unit/unit/by/dis`,
    params
  })
}
// 获取年级下拉框
export const gradeSelect = () => {
  return request({
    url: `/backend/query/grade`
  })
}
// 学生的信息
export const studentInfo = () => {
  return request({
    url: `/applet/score/student/exam/info`
  })
}
// 保存录入学生的信息
export const studentInfoAdd = (data) => {
  return request({
    url: `/applet/score/save/student/exam`,
    method: 'post',
    data
  })
}

// 保存录入学生的信息
export const updateStudentInfo = (data) => {
  return request({
		url: `/applet/score/update/student/exam`,
    method: 'post',
    data
  })
}
export const saveStudentInfo = (data) => {
  return request({
		url: `/applet/score/save/student/exam`,
    method: 'post',
    data
  })
}

// 城市学校列表
export const unitNameList = (params) => {
  return request({
    url: `/sys/unit/unit/by/unitName`,
    method: 'get',
    params,
    loading: '加载中...'
  })
}
// 修改学生的信息
export const studentInfoEdit = (data) => {
  return request({
    url: `/applet/score/update/student/exam`,
    method: 'post',
    data
  })
}
// 当前学校/年纪 参考试列表
export const unitExamList = (params) => {
  return request({
    url: `/bigdata/bigdata-anon/unit/join/exam`,
    params
  })
}
// 学生重名
export const sameName = (data) => {
  return request({
    url: `/bigdata/stu/same/name`,
    method: 'post',
    data,
    loading: '查询中...'
  })
}
// 弹框
export const bksBullet = (params) => {
  return request({
    url: `/applet/bksVipSetting/applet-anon/bullet`,
    params
  })
}

// 功能详情不需要认证
export const bksFunctionInfo = (params) => {
  return request({
    url: `/applet/bksFunction/applet-anon/detail`,
    params
  })
}
// 申请修改认证
export const apply = (params) => {
  return request({
    url: `/applet/studentInfo/change/apply`,
    params
  })
}